package pl.vanta.utils.ejb.ejbqlb.parts;

public class Select<T> extends AbstractPart<T>
{
	private boolean	distinct;

	public Select(boolean distinct)
	{
		super(null);
		this.distinct = distinct;
	}

	@Override
	public String getPart()
	{
		return "SELECT" + (this.distinct ? " DISTINCT" : "");
	}

	public From<T> FROM(Class<?>... t)
	{
		return new From<T>(this, t);
	}

	public From<T> FROM(Class<T> t)
	{
		return new From<T>(this, t);
	}
}